[index]

Write To File Command

Syntax

write <text> to file <filename>

Description

The write to file command writes text to a text file. The first write to file command executed after a file has been opened replaces that file's contents. Subsequent write to file commands append text to the file's contents. The write to file command must be preceded by an open file command and followed by a close file command. The <filename> must supply the name of the text file. The path must also be specified unless the file is located in the same directory as Oracle Media Objects.

Examples

Create a button with the following script: on mouseUp put "c:\temp\junk.txt" into test --Use this line for Windows put "c:temp:junk.txt" into test --Use this line for the Macintosh open file test write "Hello, world" & return to file test write "All Done" to file test close file test end mouseUp If the file test does not exist, Oracle Media Objects creates it. If the file does exist, the write to file command overwrites its contents.
This text has been mechanically extracted from the Oracle Media Objects 1.0.4.9 MediaTalk Reference, © 1995 Oracle Corporation, and is provided here solely for educational/historical purposes.